package com.yuyou.activity.group.service.service;

import java.util.List;

import com.yuyou.activity.group.service.entity.ActivityGroup;
import com.yuyou.activity.group.service.vo.req.ReqAttendActivityGroup;
import com.yuyou.activity.group.service.vo.resp.RespActivityGroupDetail;
import com.yuyou.activity.group.service.vo.resp.RespCanActivityGroupList;
import com.yuyou.activity.util.bean.ResBoolSimpleInfo;

public interface IActivityGroupService {
    int deleteByPrimaryKey(Long activityGroupId);

    int insert(ActivityGroup record);

    ActivityGroup selectByPrimaryKey(Long activityGroupId);

    int updateByPrimaryKeySelective(ActivityGroup record);
    
    /**
     * 找出推荐的拼团活动
     * @return
     */
    List<RespCanActivityGroupList> findCanActivityGroup(String projectCode);
    
    /**
     * 更多拼团活动
     * @param projectCode
     * @return
     */
    List<RespCanActivityGroupList> findMoreCanActivityGroup(String projectCode,int limit);
    
    /**
     * 是否可以参与
     * @param phone
     * @return
     */
    ResBoolSimpleInfo<RespActivityGroupDetail> canAttActGro(String projectCode,String phone);
    
    
    /**
     * 参加拼团，提交资料
     * @return
     */
    ResBoolSimpleInfo<RespActivityGroupDetail> attendActivityGroup(ReqAttendActivityGroup reqAttendActivityGroup)throws Exception;
    
    /**
     * 拼团详情
     * @param phone
     * @return
     */
    ResBoolSimpleInfo<RespActivityGroupDetail> activityGroupDetail(String projectCode,String phone);
    
    /**
     * 拼团详情
     * @param projectCode
     * @param activityGroupId
     * @return
     */
    ResBoolSimpleInfo<RespActivityGroupDetail> activityGroupDetailById(String projectCode,Long activityGroupId);

    /**
     * 更新超时未成功活动状态为-差额成功
     */
    void updateFailActivity();
    

}
